﻿<UserControl x:Class="NthDownload.BandwidthProviderPlugins.Views.SpeedLimitBandwidthProviderDetailsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:behaviors="clr-namespace:NthDownload.Common.Interactivity.Behaviors;assembly=NthDownload.Common"
             xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"                          
             HorizontalAlignment="Center">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>

        <TextBlock Grid.Row="0" Text="Name" Style="{StaticResource Label}" Margin="0,0,5,0"/>
        <TextBox Grid.Row="0" Grid.Column="1" Text="{Binding BandwidthProvider.Name}" Style="{StaticResource MediumTextBox}">
            <i:Interaction.Behaviors>
                <behaviors:FocusOnLoad />
            </i:Interaction.Behaviors>            
        </TextBox>

        <TextBlock Grid.Row="1" Text="Bytes Per Second" Style="{StaticResource Label}" Margin="0,5,5,0"/>
        <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding BandwidthProvider.BytesPerSecond}" Style="{StaticResource MediumTextBox}" Margin="0,5,0,0" />

        <StackPanel Grid.Row="2" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,5,0,0">
            <Button x:Name="Save" Content="Save" Margin="5,0,0,0" />            
            <Button x:Name="Cancel" Content="Cancel" Margin="5,0,0,0" />
        </StackPanel>
    </Grid>
</UserControl>
